package com.sdkx.app.model;

import com.sdkx.app.ViewModel.AirWayManager;

import java.util.ArrayList;
import java.util.List;
//当前航线
public class CurrentAirWay{
    private static   List<WayPoint> wayPoints= new ArrayList<>();
    public static List<WayPoint> getitems(){
        return wayPoints;
    }
    public void insert(int index, WayPoint wp){
        wayPoints.add(index,wp);
    }
    public void del(int index){
        wayPoints.remove(index);
    }
    public boolean saveas(String AWname){
        AirWay newaw=new AirWay();
        newaw.setName(AWname);
        AirWayManager.insert(newaw);
        return true;
    }
}
